import URL from '@/config/url'
import utils from '@/utils/utils'

export default {
	//申请参与
	getLvieapply(params = {}) {
		let data = {
			name:params.name,
			mobile:params.mobile,
			opus:params.opus,
			type:params.type,
			opus_name:params.opus_name,
			content:params.content,
			address:params.address
		}
		return utils.uniRequest({ url: URL.BASE+ '/shop/party/apply', data })
	},
	//作品列表
	getopusList(params = {}) {
		let data = {
			sort:params.sort,
			page:params.page,
			pagesize:10,
			keyword:params.keyword,
		}
		return utils.uniRequest({ url: URL.BASE+ '/shop/party/opusList', data })
	},
	//点赞作品
	getsupport(params = {}) {
		let data = {
			id:params.id,
		}
		return utils.uniRequest({ url: URL.BASE+ '/shop/party/support', data })
	},
	//活动信息
	gethome(params = {}) {
		let data = {
		}
		return utils.uniRequest({ url: URL.BASE+ '/shop/party/home', data })
	},
	//作品详情
	getopusDetail(params = {}) {
		let data = {
			id:params.id,
		}
		return utils.uniRequest({ url: URL.BASE+ '/shop/party/opusDetail', data })
	},
	//访问记录
	gelog(params = {}) {
		let data = {
			id:params.id,
		}
		return utils.uniRequest({ url: URL.BASE+ '/shop/party/log', data })
	},
	//点赞排序榜
	geputList(params = {}) {
		let data = {
			sort:params.sort,
		}
		return utils.uniRequest({ url: URL.BASE+ '/shop/party/putList', data })
	},
	//点赞日期
	gedate(params = {}) {
		let data = {
			month:params.month,
		}
		return utils.uniRequest({ url: URL.BASE+ '/shop/party/date', data })
	},
	//转发作品
	geshare(params = {}) {
		let data = {
			id:params.id,
		}
		return utils.uniRequest({ url: URL.BASE+ '/shop/party/share', data })
	},
	// 评论点赞
	supportDemo(params = {}) {
		let data = {
			comment_id: params.comment_id,   // *id(int)
			status: params.status,    // *状态(0点赞，1取消点赞  int)
		}
		return utils.uniRequest({ url: URL.BASE + '/shop/party/commentSupport', data })
	},
	
	// 获取评论列表
	getDemoComment(params = {}) {
		let data = {
			id: params.id,   // *id(int)
			// 分页
			page: params.page,  // 页数(默认1  int)
			pagesize: 10,       // 页码(默认10  int)
		}
		return utils.uniRequest({ url: URL.BASE + '/shop/party/getCommentList', data })
	},
	// 评论
	commentDemo(params = {}) {
		let data = {
			id: Number(params.id),   // *id(int)
			content: params.content,          // *评论内容
		}
		return utils.uniRequest({ url: URL.BASE + '/shop/party/comment', data })
	},
	
	// 回复评论
	replyDemo(params = {}) {
		let data = {
			comment_id: Number(params.comment_id),   // *评论id
			content: params.content,                // *回复内容
		}
		return utils.uniRequest({ url: URL.BASE + '/shop/party/reply', data })
	},
	// 删除评论
	replyDemodel(params = {}) {
		let data = {
			comment_id: params.comment_id,
		}
		return utils.uniRequest({ url: URL.BASE+ '/shop/party/delComment', data })
	},
	// 版块列表
	getSectionList(params = {}) {
		let data = {
		}
		return utils.uniRequest({ url: URL.BASE+ '/house/Community/getSectionList', data })
	},
	// 话题列表
	getZoneList(params = {}) {
		let data = {
			community_id:params.community_id,
			page:params.page,
			pagesize:params.pagesize,
		}
		return utils.uniRequest({ url: URL.BASE+ '/house/Community/getZoneList', data })
	},
	// 装修学堂列表
	getZone(params = {}) {
		let data = {
			page:params.page,
			limit:params.limit,
		}
		return utils.uniRequest({ url: URL.BASE+ '/shop/article/cate', data })
	},
	// 装修学堂更多
	getZonemore(params = {}) {
		let data = {
			type_id:params.type_id
		}
		return utils.uniRequest({ url: URL.BASE+ '/shop/article/more', data })
	},
	// 装修学堂文章分页列表
	getpaginate(params = {}) {
		let data = {
			type_id:params.type_id,
			page:params.page,
			pagesize:10,
		}
		return utils.uniRequest({ url: URL.BASE+ '/shop/article/paginate', data })
	},
	// 装修学堂详情
	getdetail(params = {}) {
		let data = {
			id:params.id,
		}
		return utils.uniRequest({ url: URL.BASE+ '/shop/article/detail', data })
	},
	// 阅读记录
	getpv(params = {}) {
		let data = {
			article_id:params.article_id,
		}
		return utils.uniRequest({ url: URL.BASE+ '/shop/article/set/pv', data })
	},
	// 点赞文章
	supportDemo(params = {}) {
		let data = {
			article_id: params.article_id,   // *案例id(int)
			status: Number(params.status),    // *状态(0点赞，1取消点赞  int)
		}
		return utils.uniRequest({ url: URL.BASE + '/shop/article/support', data })
	},
	// 获取文章评论列表
	getDemoComment(params = {}) {
		let data = {
			article_id: params.article_id,   // *案例id(int)
			// 分页
			page: Number(params.page) || 1,  // 页数(默认1  int)
			pagesize: 10,       // 页码(默认10  int)
		}
		return utils.uniRequest({ url: URL.BASE + '/shop/article/comment/lists', data })
	},
	// 评论文章
	commentDemo(params = {}) {
		let data = {
			article_id: params.article_id,   // *案例id(int)
			content: params.content,          // *评论内容
		}
		return utils.uniRequest({ url: URL.BASE + '/shop/article/comment/to', data })
	},
	// 回复评论
	replyDemo(params = {}) {
		let data = {
			comment_id: params.comment_id,   // *评论id
			content: params.content,                // *回复内容
		}
		return utils.uniRequest({ url: URL.BASE + '/shop/article/comment/reply', data })
	},
	// 删除评论
	replyDemodel(params = {}) {
		let data = {
			comment_id: params.comment_id,
		}
		return utils.uniRequest({ url: URL.BASE+ '/shop/article/comment/del', data })
	},
	// 转发
	getforward(params = {}) {
		let data = {
			article_id: params.article_id,
		}
		return utils.uniRequest({ url: URL.BASE+ '/shop/article/forward', data })
	},
	// 分享
	getsharetrace(params = {}) {
		let data = {
			article_id: params.article_id,
		}
		return utils.uniRequest({ url: URL.BASE+ '/shop/article/share', data })
	},
	// 创客学堂文章分页
	getpaging(params = {}) {
		let data = {
			page: params.page,
			pagesize: params.pagesize,
		}
		return utils.uniRequest({ url: URL.BASE+ '/shop/maker/article/paging', data })
	},
	// 创客学堂文章详情
	getpagingdetail(params = {}) {
		let data = {
			id:params.id,
			group_id:params.group_id,
			isRec: params.isRec,
		}
		return utils.uniRequest({ url: URL.BASE+ '/shop/maker/article/detail', data })
	},
	// 直播配置
	getLvieConfig(params = {}) {
		let data = {
		}
		return utils.uniRequest({ url: URL.BASE+ '/live/Live/getConfig', data })
	},
	getRankList(params = {}) {
		let data = {
			page: params.page,
			pagesize: 10,
			type:params.type
		}
		return utils.uniRequest({ url: URL.BASE+ '/dt/base/Trend/getRankList', data })
	},
	//扫商家码支付
	baseFastpay(params = {}) {
		let data = {
			pay_amount: params.pay_amount,
			store_id: params.store_id,
			memo:params.memo
		}
		return utils.uniRequest({ url: URL.BASE+ '/base/fastpay', data })
	},
	//店铺详情
	storeDetail(params = {}) {
		let data = {
			store_id: params.store_id,
			user_id: params.user_id,
			memo:params.memo
		}
		return utils.uniRequest({ url: URL.BASE+ '/shop/store/detail', data })
	},
	billRecord(params = {}) {
		let data = {
			pagesize: params.pagesize,
			//user_id: params.user_id,
			page:params.page,
			switch_date:params.switch_date
		}
		return utils.uniRequest({ url: URL.BASE+ '/collect/bill/record', data })
	},
	stewardTeam(params = {}) {
		let data = {
			page:params.page,
			pagesize:params.pagesize
		}
		return utils.uniRequest({ url: URL.BASE+ '/steward/teams/list', data })
	}
	
	
}